package com.xiaoq.distribution.repository;

import java.util.List;

import com.xiaoq.distribution.entity.DistriTicketEntity;
import com.xiaoq.vo.PagingVo;

public interface IDistriTicketRepository {
	
	public boolean save (DistriTicketEntity distriTicket);
	
	public DistriTicketEntity findById(String id);
	
	public List<DistriTicketEntity> findDistriTickets(String agreementId,PagingVo pvo);
	
	public List<DistriTicketEntity> findDistriTicketsByStatus(String shopId,PagingVo pvo,String status);


	/**
	 * @param distribId 分销商id
	 * @param ticketId 票的id
	 * @return
	 */
	DistriTicketEntity getDistriTicket(String distribId, String ticketId);

	/**
	 * @param distribId 分销商id
	 * @param ticketId 票的id
	 * @param status 审核状态
	 * @return
	 */
	List<DistriTicketEntity> getDistriTicketList(String distribId, String ticketId, String status);


	/**
	 * @param id DistriTicketEntity 主键
	 * @param plusSellTicketCount 新增，票的数量
	 * @return
	 */
	boolean updateTicketCommitCount(String id, int plusSellTicketCount);

}
